/**
 * 试题相关接口
 */
import request from '@/utils/request'

// 获取试题列表
export function getQuestionList(params) {
  return request({
    url: '/question/list',
    method: 'get',
    params
  })
}

// 获取试题详情
export function getQuestionDetail(id) {
  return request({
    url: `/question/${id}`,
    method: 'get'
  })
}

// 创建试题
export function createQuestion(data) {
  return request({
    url: '/question/create',
    method: 'post',
    data
  })
}

// 更新试题
export function updateQuestion(id, data) {
  return request({
    url: `/question/${id}`,
    method: 'put',
    data
  })
}

// 删除试题
export function deleteQuestion(id) {
  return request({
    url: `/question/${id}`,
    method: 'delete'
  })
} 